const Options = {
    bar: {
        tooltip: {
            trigger: 'axis',
            axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                // type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                type: 'cross',
                label: {
                    backgroundColor: '#6a7985'
                }
            }
        },
        legend: {
            type: 'scroll',
            textStyle: {
                color: '#ccc'
            },
            data: []
        },
        grid: {
            left: '0%',
            right: '4%',
            bottom: '0%',
            containLabel: true
        },
        xAxis: [
            {
                type: 'category',
                data: []
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '',
                type: 'bar',
                stack: '', // 堆积图
                emphasis: {
                    focus: 'series'
                },
                data: []
            },
        ]
    },
    pie: {
        title: {
            text: '',
            subtext: '',
            left: 'center',
        },
        tooltip: {
            trigger: 'item',
        },
        legend: {
            orient: 'vertical',
            left: 'left',
        },
        series: [
            {
                name: '',
                type: 'pie',
                radius: ['40%', '70%'],
                itemStyle: {
                    borderRadius: 10,
                    borderColor: '#fff',
                    borderWidth: 2,
                },
                data: [
                    // {value: 1048, name: '搜索引擎'},
                    // {value: 735, name: '直接访问'},
                    // {value: 580, name: '邮件营销'},
                    // {value: 484, name: '联盟广告'},
                    // {value: 300, name: '视频广告'}
                ],
            },
        ],
    },
    line: {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                label: {
                    backgroundColor: '#6a7985'
                }
            }
        },
        legend: {
            type: 'scroll',
            textStyle: {
                color: '#ccc'
            },
            data: []
        },
        grid: {
            left: '0%',
            right: '4%',
            bottom: '0%',
            containLabel: true
        },
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: []
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '',
                type: 'line',
                stack: '',
                emphasis: {
                    focus: 'series'
                },
                data: []
            },
        ]
    },
    gauge: {
        series: [
            {
                type: 'gauge',
                progress: {
                    show: true,
                    width: 19, // 数据宽度
                },
                axisLine: {
                    lineStyle: {
                        width: 19, // 数据背景宽度
                    },
                },
                itemStyle: {
                    color: '#58D9F9', // 数据颜色
                    shadowColor: 'rgba(0,138,255,0.7)',
                    shadowBlur: 10,
                    shadowOffsetX: 2,
                    shadowOffsetY: 2,
                },
                splitLine: {
                    show: false,
                },
                axisTick: {
                    show: false,
                },
                axisLabel: {
                    show: false,
                },
                pointer: {
                    show: false,
                },
                detail: {
                    valueAnimation: true,
                    fontSize: 50,
                    formatter: '> {value}', // 格式
                },
                title: {
                    offsetCenter: [0, '-20%'],
                    fontSize: 30,
                },
                data: [
                    {
                        value: '70',
                        name: '成绩评定', // 名称
                    },
                ],
            },
        ],
    },
    top: {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            top:'0%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01],
            show: false,
        },
        yAxis: {
            type: 'category',
            axisTick: {show: false},
            axisLine:{show: false},
            inverse: true,
            data: []
        },
        series: [
            {
                name: '',
                type: 'bar',
                label: {
                    show: true,
                    position: 'right'
                },
                itemStyle: {
                    // color: function (param) {
                    //     console.log('param',param);
                    //     return topColors[param.name] || '#5470c6';
                    // }
                },
                data: []
            }
        ]
    },
};
export default Options;
